<template>
  <div>
    <iframe
      :src="url"
      id="mobsf"
      scrolling="no"
      frameborder="0"
      style="height: calc(100vh - 100px); width: 100%"
    ></iframe>
  </div>
</template>

<script>
export default {
  name: "link",
  data() {
    return {
      links: {
        1: "http://172.16.72.155/access/#/equipment/dataPointMode",
        2: "http://172.16.72.155/access/#/equipment/dataAcquisition",
        3: "http://172.16.72.155/access/#/equipment/myPoint",
        4: "http://172.16.72.155/access/#/equipment/simulatorData",
        5: "http://172.16.72.155/access/#/equipment/dataService",
        6: "http://172.16.72.155/access/#/equipment/dataSearch",
        7: "http://172.16.72.155/dist/#/lab/newLab/management",
        8: "http://172.16.72.155/dist/#/lab/newLab/algorithm",
        9: "http://172.16.72.155/dist/#/lab/newLab/subprocess",
        10: "http://172.16.72.155/access/#/equipment/warnApps",
        11: "http://172.16.72.155/access/#/equipment/accessInterfaceManage",
        12: "http://172.16.72.155/access/#/equipment/dataPointMonitor",
      },
      url: "",
    };
  },
  mounted() {
    if (this.$route.query.type) {
      this.url = this.links[this.$route.query.type];
    } else if (this.$route.query.url) {
      this.url = this.$route.query.url;
    }
  },
  methods: {
    goTarget(href) {
      window.open(href, "_blank");
    },
  },
};
</script>

<style scoped></style>
